#ifndef THUMBNAILBAR_H
#define THUMBNAILBAR_H

#include <QWidget>
#include <QBoxLayout>
class ImageLabel;

class ThumbnailBar : public QWidget
{
    Q_OBJECT

public:
    explicit ThumbnailBar(QWidget *parent = 0);
    ~ThumbnailBar();

    void setDirection(QBoxLayout::Direction direction) { layout->setDirection(direction); }
    QPixmap getCurrentPixmap() const;

    QSize sizeHint() const;

signals:
    void imageActived(const QPixmap &pixmap);

public slots:
    void loadImage(const QString &png);
    void insertImage(const QPixmap &pixmap);
    void clear();

private slots:
    void onLabelPressed(ImageLabel *label);
    void onLabelActived(ImageLabel *label);
    void onClipboardImageReady();

private:
    QBoxLayout *layout;
    QList<ImageLabel*> labels;
    ImageLabel *currLabel;
};

#endif // ThumbnailBar_H
